#!/bin/bash

# 一定要使用 bash 运行脚本，才能兼容source引入
wget https://gitee.com/zhp1221/linux-shell/raw/master/common_func.sh -O /tmp/common_func.sh

source /tmp/common_func.sh

echo_full_line
echo " 更新软件包索引"
echo_full_line

sudo apt update

echo_full_line
echo "安装openssh-server & 启动ssh服务"
echo_full_line

# ===============安装 OpenSSH 服务器==================
sudo apt install openssh-server
# ================= SSH 服务启动 ====================
sudo service ssh start
# ==============设置 SSH 服务开机自启=================
sudo update-rc.d ssh defaults

echo_full_line
echo "小工具"
echo_full_line

sudo apt install -y \
	vim \
	lrzsz

echo_full_line
echo " 安装 zsh & oh my zsh"
echo_full_line

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended